#include "search.hpp"
#include "index.hpp"

const std::string input = "./data/raw_html/raw.txt";

int main()
{
    ns_search::search *search = new ns_search::search();
    search->Initsearch(input);

    std::string query;
    std::string jsonstr;
    while(true)
    {
        std::cout << "please input query:";
        std::getline(std::cin, query);
        //std::cout << query;
        search->Search(query, &jsonstr);

        std::cout << jsonstr << std::endl;
    }
    return 0;
}